# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: <waruqi@gmail.com>
# Contributor: lumpyzhu <lumpy.zhu@gmail.com>

pkgname=xmake
pkgver=2.7.8
pkgrel=1
pkgdesc='A cross-platform build utility based on Lua'
arch=(loong64 x86_64 i686 aarch64)
url="https://github.com/xmake-io/$pkgname"
license=(Apache)
makedepends=(ncurses
             readline)
_archive="$pkgname-$pkgver"
source=("$url/releases/download/v$pkgver/${_archive/-/-v}.tar.gz")
sha256sums=('d4112587fb0e74037ff1ac32d2f1000591ac1a297fbd74645f9b031cb079585e')

build() {
	cd "$_archive"
	./configure
	make
}

package() {
	cd "$_archive"
	make install DESTDIR="$pkgdir" PREFIX="/usr"
}
